<?php
class ProductAttribute extends Model {
	public function addPA($data) {
		return $this->dbo->insertTableRow('product_attribute',$data);
	}
	public function delPAbyPid($product_id){
		return $this->dbo->query("DELETE FROM product_attribute WHERE product_id ='".(int)$product_id."'");
	}
	public function getProductAttrByPid($product_id){
		$result = $this->dbo->query("SELECT attribute_value_id FROM product_attribute WHERE product_id='".(int)$product_id."'");
		return $result->rows;
	}
}
?>